#include <fstream>
#include <iostream>
#include <termios.h>
int main()
{

    std::cout << "Opening fstream" << std::endl;
    std::fstream file("/dev/ttyUSB0");
    std::cout << "Sending integer" << std::endl;
    file << 9 << std::endl; // endl does flush, which may be important
    std::cout << "Data Sent" << std::endl;
    std::cout << "Awaiting response" << std::endl;
    std::string response;
    file >> response;
    std::cout << "Response: " << response << std::endl;
}
